﻿using System.ComponentModel.DataAnnotations;

namespace JuCheap.Core.Model
{
    /// <summary>
    /// 角色修改模型
    /// </summary>
    public class MenuEditRequestDto
    {
        /// <summary>
        /// Id
        /// </summary>
        [Display(Name = "Id")]
        [Required(ErrorMessage = "{0}不能为空")]
        public string Id { get; set; }

        /// <summary>
        /// 父级Id
        /// </summary>
        [Display(Name = "菜单父级Id")]
        public string ParentId { get; set; }

        /// <summary>
        /// 菜单名称
        /// </summary>
        [Display(Name = "菜单名称")]
        [Required(ErrorMessage = "{0}不能为空")]
        [MaxLength(20, ErrorMessage = "{0}长度不能超过{1}个字符")]
        public string Name { get; set; }

        /// <summary>
        /// 菜单编码
        /// </summary>
        [Display(Name = "菜单编码")]
        [Required(ErrorMessage = "{0}不能为空")]
        [MaxLength(20, ErrorMessage = "{0}长度不能超过{1}个字符")]
        public string Code { get; set; }

        /// <summary>
        /// 菜单图标
        /// </summary>
        [Display(Name = "菜单图标")]
        public string Icon { get; set; }

        /// <summary>
        /// 序号
        /// </summary>
        [Display(Name = "序号")]
        public int Order { get; set; }

        /// <summary>
        /// Url地址
        /// </summary>
        [Display(Name = "菜单Url地址")]
        [MaxLength(200, ErrorMessage = "{0}长度不能超过{1}个字符")]
        public string Url { get; set; }

        /// <summary>
        /// 是否是菜单
        /// </summary>
        public bool IsMenu { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Display(Name = "菜单备注")]
        [MaxLength(200, ErrorMessage = "{0}长度不能超过{1}个字符")]
        public string Remark { get; set; }
    }
}
